# 指定 CMake 最低版本
cmake_minimum_required(VERSION 3.10)

project(ChatClient)

set(srcs ../global/commonFunc/terminal.cpp 
        ui/src/login.cpp 
        net/src/client.cpp 
        app/main.cpp)

# 设置 C++17
set(CMAKE_CXX_STANDARD 17)

# 添加 C++ 编译参数
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")

include_directories(ui/include)
include_directories(net/include)
include_directories(../messageCenter/include)

# 生成可执行程序
add_executable(client ${srcs})
link_libraries(${PROJECT_BINARY_DIR}/libs)
target_link_libraries(client messageCenter)

# https://wenku.baidu.com/view/9db9e631a11614791711cc7931b765ce05087afa.html